package com.ordersystem.mappers;

import com.ordersystem.domain.Employee;
import com.ordersystem.domain.EmployeeDistribution;
import com.ordersystem.domain.UpdateEmployeeImg;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : asus1020
 * @version : [v1.0]
 * @className : Employee
 * @description : [描述说明该类的功能]
 * @createTime : [2022/3/25 19:15]
 * @updateUser : asus1020
 * @updateTime : [2022/3/25 19:15]
 * @updateRemark : [描述说明本次修改内容]
 */
@Repository
public interface EmployeeMapper {

    List<Employee>findEmployee(String query);//查询员工数据
    int updateEmployeeStatus(@Param("eid") Integer eid, @Param("status") boolean status);//修改员工状态
    int updateEmployee(@Param("employee") Employee employee,@Param("roleId") Integer roleId);//修改员工数据
    int deleteEmplotee(Integer eid);//删除员工
    int addEmployee(@Param("employee") Employee employee,@Param("rid") Integer rid);//添加员工
    int saveEmployeeHeaderImg(@Param("imgPath") String imgPath,@Param("eid") Integer eid);
    Employee login(@Param("username") String username,@Param("password") String password);
    int checkPassword(@Param("eid") Integer eid,@Param("passoword") String password);
    int updataEmployeePassword(@Param("eid") Integer eid,@Param("passoword") String password);
    int updateEmployeeHeaderImage(UpdateEmployeeImg updateEmployeeImg);//修改头像
    List<EmployeeDistribution>getEmployeeDistribution();//获取人员分布数据
    //根据rid统计员工人数
    Integer statisticsEmployeeByRid(Integer rid);

}
